<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8" >
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="keywords" content="egg, typescript, vue, webpack, server side render">
    <meta name="description" content="IBlog">
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <meta name="renderer" content="webkit">
    <meta name="force-rendering" content="webkit">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
    <meta name="msapplication-TileImage" content="images/icons/icon-144x144.png">
    <meta name="msapplication-TileColor" content="#2F3BA2">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="Weather PWA">
    <title>用户注册</title>
    <script type="text/javascript" src="/js/jquery.min.js"></script>
    <link rel="stylesheet" href="../static/css/regist/registerone.css" data-th-href="@{/css/regist/registerone.css}">
<!--    <script type="text/javascript" src="http://static.runoob.com/assets/qrcode/qrcode.min.js"/>-->
<!--    <script src="https://cdn.bootcss.com/echarts/4.2.1-rc1/echarts.common.min.js"/>-->
</head>

<body>
<div id="app">
    <div class="main">
<!--        表头表头表头-->
        <div user-info="userInfo" class="top-header">
            <div class="top">
                <div class="container">
                    <div class="left">
                        欢迎访问考必胜，填出美好未来！
                    </div>
                    <ul class="right">
                        <li class="program0">
                            <p>
                                <a th:text="${session.name}" href="/user/userinfo"></a>
                            <div id="zero2" th:if="${session.LOGIN_STATUS} != null"><span class="userInfospan">
                                <a href="/user/userinfo">基本信息</a>
                                <a href="/vip/OpenVip">激活VIP</a>
                                <a href="/user/loginout">立即退出</a>
                                <a th:if="${session.LOGIN_STATUS} =='17873676358'" data-th-href="@{/account/index}">权限管理</a>                            </span>
                            </div>
                            </p>
                            <p>
                            <div id="zero1" th:if="${session.LOGIN_STATUS} == null">
                                <a href="/account/login">[登录]</a>
                                <a href="/user/register">[注册]</a>
                            </div>
                            </p> <!---->
                        </li>

                    </ul>
                </div>
            </div>
            <div class="nav">
                <div class="container">
                    <div class="logo"><a href="/"><img title="考必胜" data-th-src="@{/images/logo.jpg}" src="../../static/images/logo.jpg"></a>
                    </div>
                    <ul class="navbar">
                        <li><a  data-th-href="@{/user/first}" class="mian-a"><em>首页</em></a></li>
                        <li><a data-th-href="@{/user/occupation}" class="mian-a"><em>生涯规划</em></a>
                            <div><a data-th-href="@{/user/occupation}">职业性格测试</a></div>
                        </li>
                        <li><a data-th-href="@{/recommend}" class="mian-a"><em>志愿填报</em></a>
                            <div><a data-th-href="@{/recommend}">可上大学
                                <i class="hot"></i></a> <!----> </div>
                        </li>
                        <li><a data-th-href="@{/prediction}" class="mian-a"><em>测试评估</em></a>
                            <div><a data-th-href="@{/prediction}">录取概率测试
                                <i class="hot"></i></a> <a href="/compare/college">院校对比
                                <i class="hot"></i></a> </div>
                        </li>
                        <li><a data-th-href="@{/college/collegelist}" class="mian-a"><em>数据查询</em></a>
                            <div><a data-th-href="@{/college/collegelist}">学校大全</a> <a data-th-href="@{/major}">专业大全</a>
                                <a data-th-href="@{/profession}">职业大全</a>
                                <a data-th-href="@{/rank}">大学排名</a>
                                <a data-th-href="@{/batch}">查批次线</a>  </div>
                        </li>
                        <li><a data-th-href="@{/news(type=1,cpage=1)}" class="mian-a"><em>高考资讯</em></a>
                            <div><a data-th-href="@{/news(type=1,cpage=1)}">热门资讯</a> <a
                                    data-th-href="@{/news(type=2,cpage=1)}">高考资讯</a> <a
                                    data-th-href="@{/news(type=3,cpage=1)}">院校动态</a> <a
                                    data-th-href="@{/news(type=4,cpage=1)}">招生政策</a></div>
                        </li>
                    </ul>
                    <div  class="vip">
                        <a href="/vip/OpenVip">
                            开通VIP
                        </a>
                    </div>
                    <div class="secher">
                        <form data-th-action="@{/search}" method="get" data-v-b8c29c26>
                            <input type="string" name="keyword"
                                   placeholder="/ 找大学 / 找专业 / 搜职业"
                                   class="f14" data-v-b8c29c26>
                            <input type="hidden" name="type" value="1">
                            <button type="submit" data-v-b8c29c26></button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <div class="carousel banner" data-v-439474ec>
            <ul class="clearfix slide" data-v-439474ec>
                <li data-v-439474ec><a
                        style="background: #5c40f5  url(http://static.gaokao.nercel.com/web/public/img/banner3.ef0b35a4.png) no-repeat top;"
                        data-v-439474ec></a></li>
                <li style="display:none;" data-v-439474ec><a
                        style="background: #f26549   url(http://static.gaokao.nercel.com/web/public/img/banner61.35963853.png) no-repeat top;"
                        data-v-439474ec></a></li>
            </ul>
            <div class="bullet" data-v-439474ec><span class="active" data-v-439474ec></span><span
                    data-v-439474ec></span></div>
        </div>
        <div class="indexTiyan container" style="display:none;" data-v-439474ec><a href="“”" class="p1"
                                                                                   data-v-439474ec></a> <a href="“”"
                                                                                                           class="p2"
                                                                                                           data-v-439474ec></a>
        </div>
<!--表头表头表头-->
    </div>
</div>
<!--对于小链接的，例：首页>注册-->
<div class="path container" data-v-1b705696="">
    <ul >
        <li data-v-b62a9f34=""><a href="http://gaokao.nercel.com/" data-v-b62a9f34="">首页</a>
            <span > &nbsp;&gt;&nbsp;&nbsp;</span>
        </li>
        <li data-v-b62a9f34=""><a href="http://gaokao.nercel.com/register" data-v-b62a9f34="">注册</a> <!----></li>
    </ul>
</div>


<div class="reg-content container" >
    <div class="reg-title cl" data-v-3b01440e=""><h3 data-v-3b01440e="">用户注册</h3>
        <p data-v-3b01440e=""><span class="f-r" >已有帐户，
	<a href="/user/login" class="login-btn" >马上登录</a></span></p></div>


    <div class="reg-box">
        <div class="pt-30" data-v-3b01440e="">
            <form id="userinfo" method="post" class="reg-section" name="userinfo" >
                <dl >
                    <dt data-v-3b01440e="">请您填写帐号资料</dt>
                    <dd><label class="reg-section-title" ><span class="reg-star">*</span>姓名：</label>
                        <input type="text" id="userName" name="username" placeholder="请输入姓名" maxlength="16" minlength="2"
                               class="common-input"   onblur="checkname()">
                        <div id="u1" style="display: inline"></div>
                    </dd>


                    <dd><label class="reg-section-title"><span class="reg-star">*</span>性别：</label>
                        <select name="select">
                            <option value="男" selected>男</option>
                            <option value="女">女</option>
                        </select>
                    </dd>

                    <dd><label class="reg-section-title" ><span class="reg-star">*</span>手机号码：</label>
                        <input placeholder="请输入手机号" id="userPhone" name="userPhone" type="text" maxlength="16" minlength="2"
                                    class="common-input" ><div id="u3" style="display: inline"></div>
                    </dd>

                    <dd><label class="reg-section-title"><span class="reg-star">*</span>邮箱：</label>
                        <input type="text" id="useremail" name="useremail"  maxlength="50" minlength="2"
                               class="common-input"  placeholder="请输入邮箱（可用于找回密码）"  />
                        <div id="u7" style="display: inline"></div>
                    </dd>

                    <dd><label class="reg-section-title" ><span class="reg-star">*</span>密码:</label>
                        <input placeholder="请输入密码"id="password" name="password" type="password"
                               maxlength="16" minlength="6"class="common-input" onblur="checkpwd();">
                        <div id="u4" style="display: inline"></div>
                    </dd>

                    <dd><label class="reg-section-title">
                        <span class="reg-star">*</span>确认密码：</label>
                        <input type="password" class="common-input" id="enterPwd" name="enterPwd" onblur="checkepwd()">
                        <div id="u5" style="display: inline"></div><!----> <!---->
                    </dd>

                    <dd style="padding-left:290px;" >
                        <div class="pt-30" >
                            <input type="button"  class="reg-btn" onclick="checkall()" value="立即注册"></input>
                        </div>
                    </dd>
                </dl>
            </form>

        </div>
    </div>
</div>
<!--表尾表尾表尾-->
<div class="footer clearfix">
    <div class="container links">
        <div class="left-cols">
            <div class="col">
                <ul>
                    <li>关于我们</li>
                    <li><a href="https://www.hongmaoxueyuan.com/">公司介绍</a></li>
                    <li><a href="https://www.hongmaoxueyuan.com/">联系我们</a></li>
                </ul>
            </div>

            <div class="col">
                <ul>
                    <li>官方声明</li>
                    <li><a href="http://gaokao.nercel.com/news/detail/u/service">服务条款</a></li>
                    <li><a href="http://gaokao.nercel.com/news/detail/u/disclaimer">免责声明</a></li>
                    <li>&nbsp;</li>
                </ul>
            </div>
            <div class="col">
                <ul></ul>
            </div>
            <div class="col">
                <ul>
                    <li>推荐功能</li>
                    <li><a href="/user/character">录取概率测试</a> <i class="fa fa-diamond" style="color:#ffed22"></i></li>
                    <li><a href="/compare/college">院校对比</a></li>
                    <li><a href="？？？">高考咨讯</a></li>
                </ul>
            </div>

            <div class="col" style=" width: 180px;">
                <ul>
                    <li>联系我们</li>
                    <li>400 客服：400-0680-068</li>
                    <li>客服电话：13762039986</li>
                    <li>微信号码：13762039986</li>
                    <li>Q Q号码： 2692704614</li>
                </ul>
            </div>
        </div>
        <div class="right-cols">
            <div class="col"><img src="/static/images/vx.jpg">
                <p>微信官方客服</p></div>
            <div class="col"><img src="/static/images/QQ.png">
                <p>QQ官方客服1</p></div>
            <div class="col"><img src="/static/images/qq2.jpg">
                <p>QQ官方客服2</p></div>
        </div>
    </div>
</div>
<!--表尾表尾表尾-->
<!--ajax异步刷新验证手机号码-->
<script type="text/javascript">
    function exitphone() {
        var mPattern = /^1[34578]\d{9}$/;
        var userPhone = $('#userPhone').val();
        if(!mPattern.test(userPhone)) {
            document.getElementById("u3").innerHTML = "<font color='red' >电话输入有误！</font>"
            return false;
        }
        $.ajax({
            type: "post",
            url: "/user/exitphone",
            data: "userPhone=" + userPhone,
            success: function (data) {
                ine(data);
            }
        });
    }

    function ine(data) {
        if (data == 1) {
            document.getElementById("u3").innerHTML = "<font color='red' >帐号已存在</font>";
        } else if (data == 2) {
            document.getElementById("u3").innerHTML = "<font color='red'>帐号不能为空</font>";
        } else if (data == 3) {
            document.getElementById("u3").innerHTML = "<font color='green'>该账号可用来注册</font>";
        } else if (data == 0) {
            document.getElementById("u3").innerHTML = "<b style='color:red'>ajax成功返回值为空</b>"
        } else {
            document.getElementById("u3").innerHTML = "<font color='red'>未知错误</font>";
        }
    }
    $("#userPhone").blur(function() {
        exitphone();
    });
</script>
<!--ajax异步刷新验证邮箱-->
<script type="text/javascript">
    function exitemail() {
        var e = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
        var useremail = $('#useremail').val();
        if(!e.test(useremail)) {
            document.getElementById("u7").innerHTML = "<font color='red' >email输入有误！</font>"
            return false;
        }
        $.ajax({
            type: "post",
            url: '/user/exitemail',
            data: "useremail=" + useremail,
            success: function (data) {
                inee(data);
            }
        });
    }

    function inee(data) {
        if (data == 1) {
            document.getElementById("u7").innerHTML = "<font color='red' >邮箱已存在</font>";
        } else if (data == 2) {
            document.getElementById("u7").innerHTML = "<font color='red'>邮箱不能为空</font>";
        } else if (data == 3) {
            document.getElementById("u7").innerHTML = "<font color='green'>该邮箱可用来注册</font>";
        } else {
            document.getElementById("u7").innerHTML = "<font color='red'>未知错误</font>";
        }
    }
    $("#useremail").blur(function() {
        exitemail();
    });
</script>
<script th:inline="javascript">
    var msg = [[${msg}]];
    if(msg != null){
        alert(msg);
        msg="";
    }
</script>
<script type="text/javascript">
    function checkname() {
        var na = /[\u4E00-\u9FA5]/;
        var name = document.getElementById("userName").value;
        if(!na.test(name)) {
            document.getElementById("u1").innerHTML = "<font color='red' >姓名输入有误！</font>"
            return false;
        }else {
            document.getElementById("u1").innerHTML = ""
            return true;
        }
    }
    function checkpwd() {
        var pwd = document.getElementById("password").value;
        if(pwd.length<6) {
            document.getElementById("u4").innerHTML = "<font color='red' >密码输入有误！(不能少于6位数)</font>"
            return false;
        }else {
            document.getElementById("u4").innerHTML = ""
            return true;
        }
    }
    function checkepwd() {
        var pwd = document.getElementById("password").value;
        var epwd = document.getElementById("enterPwd").value;
        if(pwd != epwd) {
            document.getElementById("u5").innerHTML = "<font color='red' >2次密码输入不一致</font>";
            return false;
        }
            document.getElementById("u5").innerHTML = "";
            return true;
    }
    function checkall() {
        var name = document.getElementById("userName").value;
        var phone = document.getElementById("userPhone").value;
        var pwd = document.getElementById("password").value;
        var email = document.getElementById("useremail").value;
        if(name == "" || phone == "" || pwd == "" || email == "") {
            document.getElementById("u1").innerHTML = "<font color='red' >请补全所有信息</font>";
            return false;
        }else {
            document.userinfo.submit();
            return true;
        }
    }
</script>
</body>
</html>